Optimal. Leaf size=261 \[ \frac{(a+b x)^{m+1} (c+d x)^{-m} \left (-c d (a f h m+2 b (e h+f g))+d f h m x (b c-a d)+b c^2 f h (m+2)+2 b d^2 e g\right )}{2 b d^2 m (b c-a d)}-\frac{(a+b x)^{m+1} (c+d x)^{-m} \left (\frac{b (c+d x)}{b c-a d}\right )^m \, _2F_1\left (m,m+1;m+2;-\frac{d (a+b x)}{b c-a d}\right ) \left (d^2 \left (a^2 (-f) h (1-m) m+2 a b m (e h+f g)+2 b^2 e g\right )-2 b c d (m+1) (a f h m+b e h+b f g)+b^2 c^2 f h (m+1) (m+2)\right )}{2 b^2 d^2 m (m+1) (b c-a d)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.186199, antiderivative size = 261, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {146, 70, 69} \[ \frac{(a+b x)^{m+1} (c+d x)^{-m} \left (-c d (a f h m+2 b (e h+f g))+d f h m x (b c-a d)+b c^2 f h (m+2)+2 b d^2 e g\right )}{2 b d^2 m (b c-a d)}-\frac{(a+b x)^{m+1} (c+d x)^{-m} \left (\frac{b (c+d x)}{b c-a d}\right )^m \, _2F_1\left (m,m+1;m+2;-\frac{d (a+b x)}{b c-a d}\right ) \left (d^2 \left (a^2 (-f) h (1-m) m+2 a b m (e h+f g)+2 b^2 e g\right )-2 b c d (m+1) (a f h m+b e h+b f g)+b^2 c^2 f h (m+1) (m+2)\right )}{2 b^2 d^2 m (m+1) (b c-a d)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 146
Rule 70
Rule 69
Rubi steps
\begin{align*} \int (a+b x)^m (c+d x)^{-1-m} (e+f x) (g+h x) \, dx &=\frac{(a+b x)^{1+m} (c+d x)^{-m} \left (2 b d^2 e g+b c^2 f h (2+m)-c d (2 b (f g+e h)+a f h m)+d (b c-a d) f h m x\right )}{2 b d^2 (b c-a d) m}-\frac{\left (b^2 c^2 f h (1+m) (2+m)-2 b c d (1+m) (b f g+b e h+a f h m)+d^2 \left (2 b^2 e g+2 a b (f g+e h) m-a^2 f h (1-m) m\right )\right ) \int (a+b x)^m (c+d x)^{-m} \, dx}{2 b d^2 (b c-a d) m}\\ &=\frac{(a+b x)^{1+m} (c+d x)^{-m} \left (2 b d^2 e g+b c^2 f h (2+m)-c d (2 b (f g+e h)+a f h m)+d (b c-a d) f h m x\right )}{2 b d^2 (b c-a d) m}-\frac{\left (\left (b^2 c^2 f h (1+m) (2+m)-2 b c d (1+m) (b f g+b e h+a f h m)+d^2 \left (2 b^2 e g+2 a b (f g+e h) m-a^2 f h (1-m) m\right )\right ) (c+d x)^{-m} \left (\frac{b (c+d x)}{b c-a d}\right )^m\right ) \int (a+b x)^m \left (\frac{b c}{b c-a d}+\frac{b d x}{b c-a d}\right )^{-m} \, dx}{2 b d^2 (b c-a d) m}\\ &=\frac{(a+b x)^{1+m} (c+d x)^{-m} \left (2 b d^2 e g+b c^2 f h (2+m)-c d (2 b (f g+e h)+a f h m)+d (b c-a d) f h m x\right )}{2 b d^2 (b c-a d) m}-\frac{\left (b^2 c^2 f h (1+m) (2+m)-2 b c d (1+m) (b f g+b e h+a f h m)+d^2 \left (2 b^2 e g+2 a b (f g+e h) m-a^2 f h (1-m) m\right )\right ) (a+b x)^{1+m} (c+d x)^{-m} \left (\frac{b (c+d x)}{b c-a d}\right )^m \, _2F_1\left (m,1+m;2+m;-\frac{d (a+b x)}{b c-a d}\right )}{2 b^2 d^2 (b c-a d) m (1+m)}\\ \end{align*}
Mathematica [A] time = 0.186019, size = 221, normalized size = 0.85 \[ \frac{(a+b x)^{m+1} (c+d x)^{-m} \left (\frac{\left (\frac{b (c+d x)}{b c-a d}\right )^m \, _2F_1\left (m,m+1;m+2;\frac{d (a+b x)}{a d-b c}\right ) \left (a^2 d^2 f h (m-1) m+2 a b d m (d (e h+f g)-c f h (m+1))+b^2 \left (c^2 f h \left (m^2+3 m+2\right )-2 c d (m+1) (e h+f g)+2 d^2 e g\right )\right )}{m+1}+b \left (a d f h m (c+d x)-b \left (c^2 f h (m+2)+c d (-2 e h-2 f g+f h m x)+2 d^2 e g\right )\right )\right )}{2 b^2 d^2 m (a d-b c)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.056, size = 0, normalized size = 0. \begin{align*} \int \left ( bx+a \right ) ^{m} \left ( dx+c \right ) ^{-1-m} \left ( fx+e \right ) \left ( hx+g \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (f x + e\right )}{\left (h x + g\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{-m - 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (f h x^{2} + e g +{\left (f g + e h\right )} x\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{-m - 1}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (f x + e\right )}{\left (h x + g\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{-m - 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]